package com.csd.service.impl;

import com.csd.mapper.AdminMapper;
import com.csd.po.Admin;
import com.csd.po.SysUser;
import com.csd.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: CeSuDi_SSM
 * @author: qinjianbao
 * @create: 2020-12-24 20:32
 * @Version: 1.0
 */
@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;
    @Override
    public Admin adminLogin(String name, String password) {
        Admin admin = adminMapper.findByName(name);
        //判断密码是否相等
        if (password.equals(admin.getPassword())){
            return admin;
        }else {
            return null;
        }
    }
}
